package com.cloudpivot.receivales;

import com.alibaba.fastjson.JSONObject;
import com.cloudpivot.receivales.ding.robot.controller.RobotController;
import com.cloudpivot.receivales.ding.robot.service.DocSpaceServiceImpl;
import com.cloudpivot.receivales.ding.robot.service.RobotServiceImpl;
import com.cloudpivot.receivales.ding.robot.util.SpringContextUtil;
import com.cloudpivot.receivales.ding.userinfo.service.DingUserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;

@SpringBootTest
class CloudpivotApplicationForWorkspace {

    @Autowired
    private RobotServiceImpl robotService;

    @Autowired
    private RobotController robotController;

    @Autowired
    private DocSpaceServiceImpl docSpaceService;

    @Autowired
    private DingUserService dingUserService;


    @Test
    public void pushCard() {
//       docSpaceService.getWorkspaces("020722623423157211");
        String unionId=dingUserService.dingUidToUnionId("020722623423157211");
        System.out.println("------------>"+unionId);
//        docSpaceService.getDentries(unionId,"oJRz0yAy8YWOnXLZ");
    }

    @Test
    public void pushCard2() {
        Map<String,String> map=docSpaceService.searchFileName("vpn");
        System.out.println("-------->"+JSONObject.toJSONString(map));
    }




}
